{extend name="public:base" /}
{block name="theme"}课程列表{/block}
{block name="small_theme"}渠道课程短信{/block}
{block name="breadcrumb"}
<li><a href="{:url('olist')}">课程列表</a></li>
<li class="active">渠道课程短信</li>
{/block}
{block name="content"}
<!--<link rel="stylesheet" href="__CSS__/style.css">-->
<link rel="stylesheet" href="__CSS__/indexcommon.css">
<section class="content" style="min-height: 60px;font-size: 14px;">
    <form method="post" action="{:url('index')}" >
        <div class="box_">
            <div class="box_left">
                <div class="form-group leibei">
                    <label>ID</label>
                    <input type="text" class="form-control" name="id" placeholder="ID" value="{$form.id}" >
                </div>
                <div class="form-group leibei">
                    <label>课程</label>
                    <select class="form-control" name="kecheng">
                        <option value="">请选择课程</option>
                        {volist name="kecheng" id="data"}
                        <option value="{$data.id}"  {eq name="form['kecheng']" value="$data.id"} selected="selected" {/eq}>{$data.name}</option>
                        {/volist}
                    </select>
                </div>
                    <div class="form-group leibei">
                        <label>医院</label>
                    <select class="form-control" name="yiyuan">
                    <option value="">请选择医院</option>
                    {volist name="yiyuan" id="data"}
                    <option value="{$data.id}"  {eq name="form['yiyuan']" value="$data.id"} selected="selected" {/eq}>{$data.name}</option>
                    {/volist}
                </select>
                </div>

                <div style="margin-left: 20px;">
                    <button class="btn btn-primary">开始查询</button>
                </div>
            </div>
        </div>
    </form>
</section>
<!-- 查询结束 -->
<!-- 列表开始 -->
<div class="row">
    <div class="col-xs-12">
        <div class="box box-list">
            <div class="box-header" data-original-title="" style="height: 40px;">
                <a href="javascript:catorder('{:url('add')}');"  class="btn"><h2 style="margin-top: 0;"><i class="glyphicon glyphicon-plus"></i> 增加类别</h2></a>
            </div>
            <!-- /.box-header -->
            <div class="box-body table-responsive no-padding" style="border-bottom: 1px solid #dfdfdf;overflow: hidden;">
                <table class="table table-striped table-bordered table-condensed">
                    <tr>
                        <th>ID</th>
                        <th>课程</th>
                        <th>听课时间</th>
                        <th>医院名称</th>
                        <th>听课地址</th>
                        <th>报名电话</th>
                        <th>状态</th>
                        <th>操作</th>
                    </tr>
                    {volist name='list' id="vo" }
                    <tr>
                        <td>{$vo.id}</td>
                        <td>{$vo.kecheng_text}</td>
                        <td>{$vo.time}</td>
                        <td>{$vo.yiyuan_text}</td>
                        <td>{$vo.tkdz}</td>
                        <td>{$vo.bmdh}</td>
                        <td>{$vo.status_text}</td>
                        <td>
                            <!-- 查看订单详细 -->
                            <a class="btn btn-nopadding" href="javascript:catorder('{:url('cat',['id'=>$vo['id']])}');" alt="查看" title="查看"><i class="glyphicon glyphicon-zoom-in icon-white"></i></a>
                            <!-- 编辑订单 -->
                            <a class="btn btn-nopadding" href="javascript:catorder('{:url('edit',['id'=>$vo['id']])}');" alt="修改" title="修改"><i class="glyphicon glyphicon-edit icon-white"></i></a>
                            <!-- 删除订单 -->
                            <a class="btn btn-nopadding" href="javascript:del('{:url('del',['id'=>$vo['id']])}');" alt="删除" title="删除"><i class="glyphicon glyphicon-trash icon-white"></i></a>
                        </td>
                    </tr>
                    {/volist}

                </table>
            </div>
            <div class="page">{$page}</div>
        </div>
        <!-- /.box -->
    </div>
</div>
<!-- 列表结束 -->
</div>
{/block}
{block name="js"}
<script type="text/javascript" src="__JS__/moment.js"></script>
<script type="text/javascript" src="__JS__/daterangepicker.js"></script>
<script type="text/javascript" src="__JS__/bootstrap-datepicker.js"></script>
<script type="text/javascript" src="__JS__/bootstrap-timepicker.min.js"></script>
<script type="text/javascript" src="__JS__/common.js"></script>


<script type="text/javascript">
    function catorder(name) {
        layer.open({
            type: 2,
            title: '<h4>类别管理</h4>',
            shadeClose: true,
            shade: 0.8,
            area: ['650px', '90%'],
            content:name, //iframe的url
            end:function(){
                history.go(0);
            }
        });
    }
    function editquanxian(name) {
        $.get(name,function(msg){
            if(msg.status == 1){
                location.href=msg.url;
            }else{
                layer.msg(msg.info, {icon: msg.icon});
            }
        });
    }
    function del(name){
        layer.confirm('您确实删除订单？', {
            btn: ['确定','取消'] //按钮
        }, function(){
            $.post(name,function(data){
                if(data.status==2){
                    var ico=2;
                }else if(data.status==1){
                    var ico=1;
                }else if(data.status==0){
                    var ico=2;
                }else{
                    var ico=4;
                }
                layer.msg(data.msg, {
                    icon: ico,
                    time:2000,
                },function(){
                    history.go(0);
                });
            });

        });
    }
    highlight_subnav("{:url('index')}");
</script>
{/block}
